<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: XilSecure SHA Client APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xsecure__sha__client__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">XilSecure SHA Client APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabf91e298c2be913258c6a4b23660a528"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__sha__client__apis.html#gabf91e298c2be913258c6a4b23660a528">XSecure_Sha3Initialize</a> (void)</td></tr>
<tr class="memdesc:gabf91e298c2be913258c6a4b23660a528"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function stores the Sha3 initialize state as initialized if the current state is uninitialized.  <a href="#gabf91e298c2be913258c6a4b23660a528">More...</a><br/></td></tr>
<tr class="separator:gabf91e298c2be913258c6a4b23660a528"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga66d0db1bbf860bc2247297ce63f398a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__sha__client__apis.html#ga66d0db1bbf860bc2247297ce63f398a2">XSecure_Sha3Update</a> (XSecure_ClientInstance *InstancePtr, const u64 InDataAddr, u32 Size)</td></tr>
<tr class="memdesc:ga66d0db1bbf860bc2247297ce63f398a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to update the SHA3 engine with the input data.  <a href="#ga66d0db1bbf860bc2247297ce63f398a2">More...</a><br/></td></tr>
<tr class="separator:ga66d0db1bbf860bc2247297ce63f398a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad9611876471310e83eae5fc2ac640576"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__sha__client__apis.html#gad9611876471310e83eae5fc2ac640576">XSecure_Sha3Finish</a> (XSecure_ClientInstance *InstancePtr, const u64 OutDataAddr)</td></tr>
<tr class="memdesc:gad9611876471310e83eae5fc2ac640576"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request final data to SHA3 engine which includes SHA3 padding and reads final hash.  <a href="#gad9611876471310e83eae5fc2ac640576">More...</a><br/></td></tr>
<tr class="separator:gad9611876471310e83eae5fc2ac640576"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga08e726488222ad0ba91e822d90e97e1e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__sha__client__apis.html#ga08e726488222ad0ba91e822d90e97e1e">XSecure_Sha3Digest</a> (XSecure_ClientInstance *InstancePtr, const u64 InDataAddr, const u64 OutDataAddr, u32 Size)</td></tr>
<tr class="memdesc:ga08e726488222ad0ba91e822d90e97e1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to calculate hash on single block of data.  <a href="#ga08e726488222ad0ba91e822d90e97e1e">More...</a><br/></td></tr>
<tr class="separator:ga08e726488222ad0ba91e822d90e97e1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga08e726488222ad0ba91e822d90e97e1e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_Sha3Digest </td>
          <td>(</td>
          <td class="paramtype">XSecure_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u64&#160;</td>
          <td class="paramname"><em>InDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to calculate hash on single block of data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the client instance </td></tr>
    <tr><td class="paramname">InDataAddr</td><td>Address of the input buffer where the input data is stored </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of the output buffer to store the output hash </td></tr>
    <tr><td class="paramname">Size</td><td>Size of the data to be updated to SHA3 engine</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the sha3 hash calculation is successful</li>
<li>XST_FAILURE If there is a failure </li>
</ul>
</dd></dl>
<p>Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid</p>
<p>Initialize SHA3</p>
<p>Send an IPI request to the PLM by using the CDO command to call XSecure_ShaOperation API and returns the status of the IPI response.</p>

<p>References <a class="el" href="group__xsecure__common__apis.html#ga49179f0283044223009c733e01b79d5a">XSECURE_ADDR_HIGH_SHIFT</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acad0cd2989c68726f30ffe2fbdc41c778f">XSECURE_API_SHA3_UPDATE</a>, <a class="el" href="group__xsecure__common__apis.html#ga693c54d224d1fa8ca68b215023b2b359">XSecure_Printf</a>, <a class="el" href="group__xsecure__mailbox__apis.html#ga6ac5f0da32dd8fb5fcd15a7e65b492bb">XSecure_ProcessMailbox()</a>, and <a class="el" href="group__xsecure__sha__client__apis.html#gabf91e298c2be913258c6a4b23660a528">XSecure_Sha3Initialize()</a>.</p>

<p>Referenced by <a class="el" href="xsecure_8h.html#a6c51d7aa8a0db0c40a00a641d7aa4055">XSecure_PpkVerify()</a>.</p>

</div>
</div>
<a class="anchor" id="gad9611876471310e83eae5fc2ac640576"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_Sha3Finish </td>
          <td>(</td>
          <td class="paramtype">XSecure_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request final data to SHA3 engine which includes SHA3 padding and reads final hash. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the client instance </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of the output buffer to store the output hash</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If finished without any errors</li>
<li>XST_FAILURE If there is a failure </li>
</ul>
</dd></dl>
<p>Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid</p>
<p>Validate Sha3state. Return XST_FAILURE if the state is XSECURE_SHA_UNINITIALIZED</p>
<p>Send an IPI request to the PLM by using the CDO command to call XSecure_ShaOperation API and it returns the status of the IPI response.</p>

<p>References <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acad0cd2989c68726f30ffe2fbdc41c778f">XSECURE_API_SHA3_UPDATE</a>, <a class="el" href="group__xsecure__common__apis.html#ga693c54d224d1fa8ca68b215023b2b359">XSecure_Printf</a>, <a class="el" href="group__xsecure__mailbox__apis.html#ga6ac5f0da32dd8fb5fcd15a7e65b492bb">XSecure_ProcessMailbox()</a>, and <a class="el" href="group__xsecure__apis.html#ga32a3242ed58e1b9bd426bf2c1b8b7b1f">XSECURE_SHA_UPDATE</a>.</p>

<p>Referenced by <a class="el" href="group__xsecure__sha3__zynqmp__apis.html#gaa11b46ae20210a953d2bf3f661994c94">XSecure_Sha3Digest()</a>, <a class="el" href="xsecure_8h.html#adfb02b0d0129acbfe8a8d6a293a7285f">XSecure_Sha3Hash()</a>, and <a class="el" href="xsecure_8h.html#ae9ccb5dc051bf792ce88b8f3fe376122">XSecure_SpkAuthentication()</a>.</p>

</div>
</div>
<a class="anchor" id="gabf91e298c2be913258c6a4b23660a528"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_Sha3Initialize </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function stores the Sha3 initialize state as initialized if the current state is uninitialized. </p>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the Sha3 state is changed to initialized state</li>
<li>XST_FAILURE If the Sha3 is not in uninitialized state </li>
</ul>
</dd></dl>

<p>Referenced by <a class="el" href="xsecure_8h.html#a6c51d7aa8a0db0c40a00a641d7aa4055">XSecure_PpkVerify()</a>, <a class="el" href="group__xsecure__sha__client__apis.html#ga08e726488222ad0ba91e822d90e97e1e">XSecure_Sha3Digest()</a>, <a class="el" href="xsecure_8h.html#adfb02b0d0129acbfe8a8d6a293a7285f">XSecure_Sha3Hash()</a>, and <a class="el" href="xsecure_8h.html#ae9ccb5dc051bf792ce88b8f3fe376122">XSecure_SpkAuthentication()</a>.</p>

</div>
</div>
<a class="anchor" id="ga66d0db1bbf860bc2247297ce63f398a2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_Sha3Update </td>
          <td>(</td>
          <td class="paramtype">XSecure_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u64&#160;</td>
          <td class="paramname"><em>InDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to update the SHA3 engine with the input data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the client instance </td></tr>
    <tr><td class="paramname">InDataAddr</td><td>Address of the output buffer to store the output hash </td></tr>
    <tr><td class="paramname">Size</td><td>Size of the data to be updated to SHA3 engine</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the update is successful</li>
<li>XST_FAILURE If there is a failure </li>
</ul>
</dd></dl>
<p>Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid</p>
<p>Validate Sha3state. Return XST_FAILURE if the state is not XSECURE_SHA_UNINITIALIZED</p>
<p>Send an IPI request to the PLM by using the CDO command to call XSecure_ShaOperation API and returns the status of the IPI response.</p>

<p>References <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acad0cd2989c68726f30ffe2fbdc41c778f">XSECURE_API_SHA3_UPDATE</a>, <a class="el" href="group__xsecure__common__apis.html#ga693c54d224d1fa8ca68b215023b2b359">XSecure_Printf</a>, <a class="el" href="group__xsecure__mailbox__apis.html#ga6ac5f0da32dd8fb5fcd15a7e65b492bb">XSecure_ProcessMailbox()</a>, and <a class="el" href="group__xsecure__apis.html#ga32a3242ed58e1b9bd426bf2c1b8b7b1f">XSECURE_SHA_UPDATE</a>.</p>

<p>Referenced by <a class="el" href="group__xsecure__sha3__zynqmp__apis.html#gaa11b46ae20210a953d2bf3f661994c94">XSecure_Sha3Digest()</a>, <a class="el" href="xsecure_8h.html#adfb02b0d0129acbfe8a8d6a293a7285f">XSecure_Sha3Hash()</a>, and <a class="el" href="xsecure_8h.html#ae9ccb5dc051bf792ce88b8f3fe376122">XSecure_SpkAuthentication()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
